import api from "@/api";
import { PORT } from "../config/servicePort";

/**
 * 创建店铺
 */
export async function addShopsApi(data: any): Promise<any> {
	return api.post(`${PORT}/Shops/add`, data);
}

/**
 * 获取店铺列表
 */
export async function getShopsListApi(data?: any): Promise<any> {
	return api.get(`${PORT}/Shops/getList`, { ...data });
}

/**
 * 店铺状态切换
 */
export async function updateShopsStatusApi(data: any): Promise<any> {
	return api.post(`${PORT}/Shops/check`, data);
}

/**
 * 删除店铺
 */
export async function deleteShopsApi(data: any): Promise<any> {
	return api.post(`${PORT}/Shops/del`, data);
}

/**
 * 获取退发货地址列表
 */
export async function getShopsAddressListApi(data?: any): Promise<any> {
	return api.get(`${PORT}/ShopReturnAddresses/getList`, { ...data });
}

/**
 * 创建退发货地址
 */
export async function addShopsAddressApi(data: any): Promise<any> {
	return api.post(`${PORT}/ShopReturnAddresses/add`, data);
}

/**
 * 删除退发货地址
 */
export async function deleteShopsAddressApi(data: any): Promise<any> {
	return api.post(`${PORT}/ShopReturnAddresses/del`, data);
}
